package  
{
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	
	/**
	 * ...
	 * @author patsup
	 */
	public class Button extends MovieClip
	{
		public function Button(xCoord:int, yCoord:int)
		{
			x = xCoord;
			y = yCoord;
			mouseChildren = false;			//make it so children don't mess up the mouseover-ing
		}
		
		//Initialize()
		//Initializes the creation of the Button
		public function Initialize():void
		{	
		}
		
		//InitImage()
		//Initializes the image of the Button
		protected function InitImage():void
		{
		}
		
		//InitInput()
		//Initializes the input of the Button
		protected function InitInput():void
		{
			EnableButton();
		}
		
		//InputMouseClick()
		//takes action upon hearing the mouseclick event
		protected function InputMouseClick(e:MouseEvent):void
		{
			trace("InputMouseClick on: " + e.currentTarget.name);
		}
		
		//EnableButton()
		//make the button clickable again
		public function EnableButton():void
		{
			addEventListener(MouseEvent.CLICK, InputMouseClick);
			buttonMode = true;
		}
		
		//DisableButton()
		//make the button unclickable
		public function DisableButton():void
		{
			removeEventListener(MouseEvent.CLICK, InputMouseClick);
			buttonMode = false;
		}
		
	}

}